#ifndef TILE_H
#define TILE_H 1

#include "object.h"
#include "item.h"

class Tile : public Object{
private:
	bool walkable;
	bool opaque;
	bool seen;
	int lit;
	bool toggles;
	int toggles_into;
	Item* inv;
public:
	Tile() : walkable(true),opaque(false),seen(false),lit(0),toggles(false),toggles_into(-1),inv(NULL){}
	Tile(Tile& in,int r,int c);
	bool IsWalkable(){ return walkable; }
	bool IsOpaque(){ return opaque; }
	bool HasBeenSeen(){ return seen; }
	int IsLit(){ return lit; }
	bool Toggles(){ return toggles; }
	Item* ItemPtr(){ return inv; }
	void CloneSelf(int r,int c);
	void Define(int id_,string name_,char symbol_,int color_,bool walkable_,bool opaque_,bool toggles_,int toggles_into_);
	void Define(Tile& in);
	void RFG();
	void Draw(bool visible,bool draw_lit);
	void PlusLight();
	void MinusLight();
	void GetItem(Item* ptr);
	void LoseItem(){ inv = NULL; }
	void MarkAsSeen(){ seen = true; }
	bool OpaqueIsLit(int y2,int x2);
};

#endif

